package com.javaEE.tes.services;

import com.javaEE.tes.dao.Class1Repository;
import com.javaEE.tes.dao.dto.StudentClass1;
import com.javaEE.tes.entities.Class1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Class1Service {
    @Autowired
    Class1Repository class1Repository;
    public Class1 save(Class1 class1){
        return class1Repository.save(class1);
    }
    public List<Class1> getAll(){return class1Repository.findAll();}
    public List<StudentClass1> class1Student(){
        return class1Repository.class1Student();
    }
}
